<template>
  <div id="searchexpress">
    <el-card class="body" body-style="{border-radius: 5%;padding:10px;}">
      <div id="title">运单查询</div>
    </el-card>
    <el-card class="body" body-style="{border-radius: 5%;padding:10px;}">
      <el-input placeholder="请输入内容" v-model="input">
        <el-button slot="append" icon="el-icon-search"></el-button>
      </el-input>
      <div id="nav">
        <div @click="push_to('')" class="nav_item">我寄的</div>
        <div @click="push_to('/get')" class="nav_item">我收的</div>
      </div>
      <div id="nav_body">
        <router-view/>
      </div>
    </el-card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      input:""
    };
  },
  methods:{
    push_to(path){
      this.$router.push({
        path: '/Workplace/searchexpress'+path
      });
    }
  }
};
</script>

<style scoped>
#title {
  font-size: 24px;
}
.body {
  margin: 10px 0px;
}
#nav{
  width: 100%;
  height: auto;
  border-bottom: 2px solid rgb(239,241,244);
}
.nav_item{
  display: inline-block;
  width: 6%;
  text-align: center;
  margin-right: 2%;
  padding-top: 2%;
  font-size: 18px;
  box-sizing: border-box;
}
.nav_item:active{
  color: rgb(220, 30, 50);
}
#nav_body{
  width: 100%;
  height: auto;
  min-height: 200px;
}
</style>